package org.feiye.studyday02.practice;

import java.util.Scanner;

public class Interests {

	public static void main(String[] args) {
		// 书上第二章练习3
		Scanner input = new Scanner(System.in);
		System.out.println("请输入本金：");
		int benJin = input.nextInt();
		double oneYear = benJin * (1 + 0.025 * 1);
		double twoYears = benJin * (1 + 0.027 * 2);
		double threeYears = benJin * (1 + 0.0324 * 3);
		double fiveYears = benJin * (1 + 0.036 * 5);
		System.out.println("本金为：" + benJin + "\n");
		System.out.println("存取一年后的本息是：" + oneYear + "\n");
		System.out.println("存取两年后的本息是：" + twoYears + "\n");
		System.out.println("存取三年后的本息是：" + threeYears + "\n");
		System.out.println("存取五年后的本息是：" + fiveYears + "\n");
	}

}
